<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增订单卡号信息')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-info-add">
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">周：</label>
                <div class="col-sm-8">
                    <input name="weekNum" class="form-control" type="text" value="WK-" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required ">日期：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="timeFlag" id="laydate-demo-2" class="form-control" type="text" value="2022-09-26" required>
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">客户名称：</label>
                <div class="col-sm-8">
                    <select name="customerName" class="form-control" th:with="cus=${cwWipCustomerInfo}">
                        <option th:each="dict : ${cus}" th:text="${dict.customerName}" th:value="${dict.customerName}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">订单号：</label>
                <div class="col-sm-8">
                    <input name="orderNumber" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">产品类型：</label>
                <div class="col-sm-8">
                    <select name="partType" class="form-control" th:with="type=${@dict.getType('wip_part_type')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">同冠名称：</label>
                <div class="col-sm-8">
                    <input name="tgName" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">产品名称：</label>
                <div class="col-sm-8">
                    <input name="partName" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">卡号：</label>
                <div class="col-sm-8">
                    <input name="lotId" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">数量：</label>
                <div class="col-sm-8">
                    <input name="mainQty" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">备注：</label>
                <div class="col-sm-8 col-xs-10">
                    <textarea id="remark" name="remark" maxlength="100" class="form-control" rows="3"></textarea>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "wip/order"
        $("#form-info-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-info-add').serialize());
            }
        }

        $(function () {
            layui.use('laydate', function (){
                var laydate = layui.laydate;
                laydate.render({
                    elem: '#laydate-demo-2',
                    type: 'date',
                    min: '2008-01-01'
                });
            });
        });
    </script>
</body>
</html>